<!DOCTYPE html>
<html lang="en">
<head>
    
    <meta charset="utf-8">
    <title>DateUtil - Documentation</title>
    
    
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
    <script src="scripts/nav.js" defer></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav >
    
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ArrayUtil.html">ArrayUtil</a><ul class='methods'><li data-type='method'><a href="ArrayUtil.html#.complement">complement</a></li><li data-type='method'><a href="ArrayUtil.html#.contains">contains</a></li><li data-type='method'><a href="ArrayUtil.html#.defaultIfEmpty">defaultIfEmpty</a></li><li data-type='method'><a href="ArrayUtil.html#.hasNull">hasNull</a></li><li data-type='method'><a href="ArrayUtil.html#.hasUndefined">hasUndefined</a></li><li data-type='method'><a href="ArrayUtil.html#.intersect">intersect</a></li><li data-type='method'><a href="ArrayUtil.html#.isEmpty">isEmpty</a></li><li data-type='method'><a href="ArrayUtil.html#.isNotEmpty">isNotEmpty</a></li><li data-type='method'><a href="ArrayUtil.html#.minus">minus</a></li><li data-type='method'><a href="ArrayUtil.html#.remove">remove</a></li><li data-type='method'><a href="ArrayUtil.html#.removeOne">removeOne</a></li><li data-type='method'><a href="ArrayUtil.html#.unique">unique</a></li><li data-type='method'><a href="ArrayUtil.html#.uniquelize">uniquelize</a></li></ul></li><li><a href="Base64.html">Base64</a><ul class='methods'><li data-type='method'><a href="Base64.html#.decodeStr">decodeStr</a></li><li data-type='method'><a href="Base64.html#.encodeStr">encodeStr</a></li></ul></li><li><a href="BufferUtil.html">BufferUtil</a><ul class='methods'><li data-type='method'><a href="BufferUtil.html#.bufferToStream">bufferToStream</a></li><li data-type='method'><a href="BufferUtil.html#.streamToBuffer">streamToBuffer</a></li></ul></li><li><a href="DatePattern.html">DatePattern</a></li><li><a href="DateUtil.html">DateUtil</a><ul class='methods'><li data-type='method'><a href="DateUtil.html#.dateSecond">dateSecond</a></li><li data-type='method'><a href="DateUtil.html#.dayOfWeek">dayOfWeek</a></li><li data-type='method'><a href="DateUtil.html#.dayOfYear">dayOfYear</a></li><li data-type='method'><a href="DateUtil.html#.format">format</a></li><li data-type='method'><a href="DateUtil.html#.formatChineseDateTime">formatChineseDateTime</a></li><li data-type='method'><a href="DateUtil.html#.formatDate">formatDate</a></li><li data-type='method'><a href="DateUtil.html#.formatDateTime">formatDateTime</a></li><li data-type='method'><a href="DateUtil.html#.formatTime">formatTime</a></li><li data-type='method'><a href="DateUtil.html#.getEndDate">getEndDate</a></li><li data-type='method'><a href="DateUtil.html#.getFirstDayOfMonth">getFirstDayOfMonth</a></li><li data-type='method'><a href="DateUtil.html#.getStartDate">getStartDate</a></li><li data-type='method'><a href="DateUtil.html#.getToDayEndDate">getToDayEndDate</a></li><li data-type='method'><a href="DateUtil.html#.getToDayStartDate">getToDayStartDate</a></li><li data-type='method'><a href="DateUtil.html#.isAM">isAM</a></li><li data-type='method'><a href="DateUtil.html#.isPM">isPM</a></li><li data-type='method'><a href="DateUtil.html#.month">month</a></li><li data-type='method'><a href="DateUtil.html#.nowDate">nowDate</a></li><li data-type='method'><a href="DateUtil.html#.nowDateSecond">nowDateSecond</a></li><li data-type='method'><a href="DateUtil.html#.parse">parse</a></li><li data-type='method'><a href="DateUtil.html#.quarter">quarter</a></li><li data-type='method'><a href="DateUtil.html#.year">year</a></li></ul></li><li><a href="ErrorUtil.html">ErrorUtil</a><ul class='methods'><li data-type='method'><a href="ErrorUtil.html#.getMsg">getMsg</a></li><li data-type='method'><a href="ErrorUtil.html#.getStack">getStack</a></li></ul></li><li><a href="HashUtil.html">HashUtil</a><ul class='methods'><li data-type='method'><a href="HashUtil.html#.fnvHash">fnvHash</a></li><li data-type='method'><a href="HashUtil.html#.hornerHash">hornerHash</a></li></ul></li><li><a href="Ipv4Util.html">Ipv4Util</a><ul class='methods'><li data-type='method'><a href="Ipv4Util.html#.formatIpBlock">formatIpBlock</a></li><li data-type='method'><a href="Ipv4Util.html#.ipv4ToNum">ipv4ToNum</a></li><li data-type='method'><a href="Ipv4Util.html#.isIpv4">isIpv4</a></li><li data-type='method'><a href="Ipv4Util.html#.numToIpv4">numToIpv4</a></li></ul></li><li><a href="MapUtil.html">MapUtil</a><ul class='methods'><li data-type='method'><a href="MapUtil.html#.isEmpty">isEmpty</a></li><li data-type='method'><a href="MapUtil.html#.isNotEmpty">isNotEmpty</a></li><li data-type='method'><a href="MapUtil.html#.mapToObject">mapToObject</a></li><li data-type='method'><a href="MapUtil.html#.objectToMap">objectToMap</a></li></ul></li><li><a href="Md5Util.html">Md5Util</a><ul class='methods'><li data-type='method'><a href="Md5Util.html#.createMd5">createMd5</a></li></ul></li><li><a href="NetUtil.html">NetUtil</a><ul class='methods'><li data-type='method'><a href="NetUtil.html#.getIPV4Address">getIPV4Address</a></li><li data-type='method'><a href="NetUtil.html#.getIPV6Address">getIPV6Address</a></li><li data-type='method'><a href="NetUtil.html#.getMultistageReverseProxyIp">getMultistageReverseProxyIp</a></li><li data-type='method'><a href="NetUtil.html#.isIp">isIp</a></li><li data-type='method'><a href="NetUtil.html#.isIpv4">isIpv4</a></li><li data-type='method'><a href="NetUtil.html#.isIpv6">isIpv6</a></li><li data-type='method'><a href="NetUtil.html#.isUnknown">isUnknown</a></li><li data-type='method'><a href="NetUtil.html#.isUsableLocalPort">isUsableLocalPort</a></li><li data-type='method'><a href="NetUtil.html#.isValidPort">isValidPort</a></li></ul></li><li><a href="ObjectIdUtil.html">ObjectIdUtil</a><ul class='methods'><li data-type='method'><a href="ObjectIdUtil.html#.isValid">isValid</a></li></ul></li><li><a href="ObjectUtil.html">ObjectUtil</a><ul class='methods'><li data-type='method'><a href="ObjectUtil.html#.isEmpty">isEmpty</a></li><li data-type='method'><a href="ObjectUtil.html#.isNotEmpty">isNotEmpty</a></li><li data-type='method'><a href="ObjectUtil.html#.mapToObject">mapToObject</a></li><li data-type='method'><a href="ObjectUtil.html#.objectToMap">objectToMap</a></li></ul></li><li><a href="OSUtil.html">OSUtil</a><ul class='methods'><li data-type='method'><a href="OSUtil.html#.getArch">getArch</a></li><li data-type='method'><a href="OSUtil.html#.getCpus">getCpus</a></li><li data-type='method'><a href="OSUtil.html#.getEOL">getEOL</a></li><li data-type='method'><a href="OSUtil.html#.getFreemem">getFreemem</a></li><li data-type='method'><a href="OSUtil.html#.getHostName">getHostName</a></li><li data-type='method'><a href="OSUtil.html#.getIPV4Address">getIPV4Address</a></li><li data-type='method'><a href="OSUtil.html#.getIPV6Address">getIPV6Address</a></li><li data-type='method'><a href="OSUtil.html#.getPlatform">getPlatform</a></li><li data-type='method'><a href="OSUtil.html#.getTotalmem">getTotalmem</a></li><li data-type='method'><a href="OSUtil.html#.getUptime">getUptime</a></li><li data-type='method'><a href="OSUtil.html#.getUserInfo">getUserInfo</a></li><li data-type='method'><a href="OSUtil.html#.getVersion">getVersion</a></li></ul></li><li><a href="PageUtil.html">PageUtil</a><ul class='methods'><li data-type='method'><a href="PageUtil.html#.rainbow">rainbow</a></li><li data-type='method'><a href="PageUtil.html#.totalPage">totalPage</a></li></ul></li><li><a href="PatternPooL.html">PatternPooL</a></li><li><a href="PhoneUtil.html">PhoneUtil</a><ul class='methods'><li data-type='method'><a href="PhoneUtil.html#.isMobile">isMobile</a></li><li data-type='method'><a href="PhoneUtil.html#.isPhone">isPhone</a></li><li data-type='method'><a href="PhoneUtil.html#.isTel">isTel</a></li></ul></li><li><a href="RandomUtil.html">RandomUtil</a><ul class='methods'><li data-type='method'><a href="RandomUtil.html#.randomEle">randomEle</a></li><li data-type='method'><a href="RandomUtil.html#.randomEnStr">randomEnStr</a></li><li data-type='method'><a href="RandomUtil.html#.randomInt">randomInt</a></li><li data-type='method'><a href="RandomUtil.html#.randomStr">randomStr</a></li></ul></li><li><a href="RandomWeightUtil.html">RandomWeightUtil</a><ul class='methods'><li data-type='method'><a href="RandomWeightUtil.html#add">add</a></li><li data-type='method'><a href="RandomWeightUtil.html#clear">clear</a></li><li data-type='method'><a href="RandomWeightUtil.html#next">next</a></li></ul></li><li><a href="RequestUtil.html">RequestUtil</a><ul class='methods'><li data-type='method'><a href="RequestUtil.html#.getClientIp">getClientIp</a></li><li data-type='method'><a href="RequestUtil.html#.getClientIpByHeaders">getClientIpByHeaders</a></li></ul></li><li><a href="ReUtil.html">ReUtil</a><ul class='methods'><li data-type='method'><a href="ReUtil.html#.test">test</a></li></ul></li><li><a href="Sh1Util.html">Sh1Util</a><ul class='methods'><li data-type='method'><a href="Sh1Util.html#.sh1">sh1</a></li></ul></li><li><a href="Snowflake.html">Snowflake</a><ul class='methods'><li data-type='method'><a href="Snowflake.html#nextId">nextId</a></li></ul></li><li><a href="StreamUtil.html">StreamUtil</a><ul class='methods'><li data-type='method'><a href="StreamUtil.html#.bufferToStream">bufferToStream</a></li></ul></li><li><a href="StringFormatUtil.html">StringFormatUtil</a><ul class='methods'><li data-type='method'><a href="StringFormatUtil.html#.format">format</a></li></ul></li><li><a href="StringUtil.html">StringUtil</a><ul class='methods'><li data-type='method'><a href="StringUtil.html#.hasAllEmpty">hasAllEmpty</a></li><li data-type='method'><a href="StringUtil.html#.hasBlank">hasBlank</a></li><li data-type='method'><a href="StringUtil.html#.hasEmpty">hasEmpty</a></li><li data-type='method'><a href="StringUtil.html#.isAllBlank">isAllBlank</a></li><li data-type='method'><a href="StringUtil.html#.isBlank">isBlank</a></li><li data-type='method'><a href="StringUtil.html#.isEmpty">isEmpty</a></li><li data-type='method'><a href="StringUtil.html#.isNotBlank">isNotBlank</a></li><li data-type='method'><a href="StringUtil.html#.isNotEmpty">isNotEmpty</a></li></ul></li><li><a href="UrlUtil.html">UrlUtil</a><ul class='methods'><li data-type='method'><a href="UrlUtil.html#.queryToObj">queryToObj</a></li></ul></li><li><a href="UUID.html">UUID</a><ul class='methods'><li data-type='method'><a href="UUID.html#.randomUUID">randomUUID</a></li></ul></li></ul>
</nav>

<div id="main">
    
    <h1 class="page-title">DateUtil</h1>
    

    




<section>

<header>
    
        <h2>
        DateUtil
        </h2>
        
            <div class="class-description usertext">date工具类</div>
        
    
</header>

<article>
    
        <div class="container-overview">
        
            

    
    <h2>Constructor</h2>
    

    <h4 class="name" id="DateUtil"><span class="type-signature"></span>new DateUtil<span class="signature">()</span><span class="type-signature"></span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line7">line 7</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>
































        
        </div>
    

    

    

    
    
    

     

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id=".dateSecond"><span class="type-signature">(static) </span>dateSecond<span class="signature">(date)</span><span class="type-signature"> &rarr; {number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line30">line 30</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获取日期秒数
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".dayOfWeek"><span class="type-signature">(static) </span>dayOfWeek<span class="signature">(date)</span><span class="type-signature"> &rarr; {number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line78">line 78</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获取日期为星期几 0 为周日 1为周一
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".dayOfYear"><span class="type-signature">(static) </span>dayOfYear<span class="signature">(date)</span><span class="type-signature"> &rarr; {number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line67">line 67</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获取日期在当年的第几天
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".format"><span class="type-signature">(static) </span>format<span class="signature">(date, formatStr)</span><span class="type-signature"> &rarr; {string}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line108">line 108</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    格式化时间
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>formatStr</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">例如  yyyy-MM-dd HH:mm:ss</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".formatChineseDateTime"><span class="type-signature">(static) </span>formatChineseDateTime<span class="signature">(date)</span><span class="type-signature"> &rarr; {string}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line166">line 166</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    格式化时间为 中国时间
 yyyy年MM月dd日HH时mm分ss秒
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">指定时间</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        
<div class="param-desc">
    格式化后的时间字符串
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".formatDate"><span class="type-signature">(static) </span>formatDate<span class="signature">(date)</span><span class="type-signature"> &rarr; {string}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line145">line 145</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    格式化时间为 yyyy-MM-dd
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">指定时间</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        
<div class="param-desc">
    格式化后的日期
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".formatDateTime"><span class="type-signature">(static) </span>formatDateTime<span class="signature">(date)</span><span class="type-signature"> &rarr; {string}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line135">line 135</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    格式化时间为 yyyy-MM-dd HH:mm:ss
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">指定时间</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        
<div class="param-desc">
    格式化后的日期
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".formatTime"><span class="type-signature">(static) </span>formatTime<span class="signature">(date)</span><span class="type-signature"> &rarr; {string}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line155">line 155</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    格式化时间为 HH:mm:ss
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">指定时间</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".getEndDate"><span class="type-signature">(static) </span>getEndDate<span class="signature">(date)</span><span class="type-signature"> &rarr; {Date}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line192">line 192</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获取某一天的结束时间
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">指定时间</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Date</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".getFirstDayOfMonth"><span class="type-signature">(static) </span>getFirstDayOfMonth<span class="signature">(date)</span><span class="type-signature"> &rarr; {Date}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line238">line 238</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获取本月第一天的日期
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Date</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".getStartDate"><span class="type-signature">(static) </span>getStartDate<span class="signature">(date)</span><span class="type-signature"> &rarr; {Date}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line175">line 175</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获取指定日期当日的开始时间
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Date</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".getToDayEndDate"><span class="type-signature">(static) </span>getToDayEndDate<span class="signature">()</span><span class="type-signature"> &rarr; {Date}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line201">line 201</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获取当天的结束时间
</div>

























<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Date</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".getToDayStartDate"><span class="type-signature">(static) </span>getToDayStartDate<span class="signature">()</span><span class="type-signature"> &rarr; {Date}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line183">line 183</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获取当天的开始时间
</div>

























<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Date</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".isAM"><span class="type-signature">(static) </span>isAM<span class="signature">(date)</span><span class="type-signature"> &rarr; {boolean}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line87">line 87</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    是否为上午
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".isPM"><span class="type-signature">(static) </span>isPM<span class="signature">(date)</span><span class="type-signature"> &rarr; {boolean}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line97">line 97</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    是否为下午
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".month"><span class="type-signature">(static) </span>month<span class="signature">(date)</span><span class="type-signature"> &rarr; {number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line58">line 58</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获取指定日期的月份
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">时间</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        
<div class="param-desc">
    第几月
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".nowDate"><span class="type-signature">(static) </span>nowDate<span class="signature">()</span><span class="type-signature"> &rarr; {Date}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line13">line 13</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获取当前时间
</div>

























<h5>Returns:</h5>

        
<div class="param-desc">
    当前时间对象
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Date</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".nowDateSecond"><span class="type-signature">(static) </span>nowDateSecond<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line21">line 21</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获取当前秒数
</div>

























<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".parse"><span class="type-signature">(static) </span>parse<span class="signature">(dateStr, format)</span><span class="type-signature"> &rarr; {Date|null}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line212">line 212</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    日期解析
<link>https://www.cnblogs.com/liuxianan/p/js-date-format-parse.html</link>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>dateStr</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>format</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">例如'yyyy-MM-dd'</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Date</span>
|

<span class="param-type">null</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".quarter"><span class="type-signature">(static) </span>quarter<span class="signature">(date)</span><span class="type-signature"> &rarr; {number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line49">line 49</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获得指定日期所属季度，从1开始计数 <br/>
注：这里是每个月为一个季度
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">时间</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        
<div class="param-desc">
    季度
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".year"><span class="type-signature">(static) </span>year<span class="signature">(date)</span><span class="type-signature"> &rarr; {number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="date_DateUtil.js.html">date/DateUtil.js</a>, <a href="date_DateUtil.js.html#line39">line 39</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description usertext">
    获取data的年
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">时间</td>
        </tr>

    
    </tbody>
</table>
















<h5>Returns:</h5>

        
<div class="param-desc">
    4位/年
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    



        
    

    

    
</article>

</section>




    
    
</div>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a> on Thu Jul 01 2021 17:38:06 GMT+0800 (中国标准时间) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>



</body>
</html>